
# ifndef __DFX_AUDIO_PLUGIN_H__
# define __DFX_AUDIO_PLUGIN_H__

# include "dfxAudioDevice.h"
# include "dfxSingleton.h"
# include "dfxPlugin.h"

namespace DFX
{
    extern "C"
    {
        typedef DFXRESULT (*AUDIODEVICECREATE)(AudioDevice **ad);
    }

    class DFX_EXPORT AudioPlugin : public Singleton<AudioPlugin>, Plugin
    {
    private:

        UInt32                  mHandle;
        String                  mDllFile;
        AUDIODEVICECREATE       mAudioDeviceCreate;

    public:

        AudioPlugin(const String &dllFile);
        ~AudioPlugin();

        const String& GetDllFile() const
        {
            return mDllFile;
        }

        DFXRESULT AudioDeviceCreate(AudioDevice **ad);

        DFXRESULT Load();
        DFXRESULT Unload();
    };
}

# endif